package cn.zymall.merchant.controller;

import cn.zymall.common.controller.crud.BaseController;
import cn.zymall.common.model.Merchant;
import cn.zymall.merchant.service.MerchantAccountService;
import cn.zymall.merchant.service.MerchantService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @ClassName MerchantController
 * @Description 店铺
 * @Author chenmei
 * @Date 2020/8/17 20:05
 * @Version 1.0
 **/
@RestController
@RequestMapping("/merchant")
public class MerchantController extends BaseController<MerchantAccountService, Merchant> {
	@Autowired
	MerchantService merchantService; //hget

	/**
	 *返回所有的店铺类型
	 * @return
	 */
	@GetMapping("/getAllMerchantType")
	public List<Object> getAllMerchantType() {
		return merchantService.getAllMerchantType();
	}

	/**
	 * 返回所有店铺主营类型
	 * @return
	 */
	@GetMapping("/getMainCategories")
	public List<Object> getMainCategories() {
		return merchantService.getMainCategories();
	}
}
